package com.app.miwawa.api.system.entity.config;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.framework.common.api.entity.CommonEntityUUID;
import org.framework.common.api.support.annotation.Chosen;
import org.framework.common.api.support.annotation.ChosenType;

/**
 * 系统管理－数据字典
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年4月23日 下午2:02:27
 * @version 1.0.2016
 */
@Entity @Table(name = "TB_SYSTEM_CODEC")
public class Codec extends CommonEntityUUID {

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = 676434117148754337L;

	// 父ID
	@Column(name = "pid", length = 50, nullable = true)
	private String pid;
	
	// 父编码
	@Column(name = "pcode", length = 50, nullable = true)
	private String pcode;
	
	// 字典名称
	@Column(name = "name", length = 50, nullable = true)
	private String name;
	
	// 字典编码
	@Column(name = "code", length = 50, nullable = true)
	private String code;
	
	// 字典文本
	@Column(name = "text", length = 50, nullable = true)
	private String text;
	
	// 字典排序
	@Column(name = "sort", nullable = true)
	private Integer sort;

	
	@Override
	@Chosen(type=ChosenType.ATTRIBUTE)
	public String getId() {
		return super.getId();
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getPcode() {
		return pcode;
	}

	public void setPcode(String pcode) {
		this.pcode = pcode;
	}

	@Chosen(type=ChosenType.TEXT)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Chosen(type=ChosenType.ATTRIBUTE)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Chosen(type=ChosenType.VALUE)
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
}
